#ifndef BLOCK_DEVICE_HPP
#define BLOCK_DEVICE_HPP

class BlockDevice {
public:
    virtual ~BlockDevice() = default;

    virtual bool open(void) = 0;
    virtual bool close(void) = 0;
    virtual unsigned int readBlock(void *buffer,unsigned int start_block,unsigned int count) = 0;
    virtual unsigned int writeBlock(const void *buffer,unsigned int start_block,unsigned int count) = 0;

    virtual unsigned int getBlockSize(void) const = 0;
    virtual unsigned int getBlockCount(void) const = 0;

    virtual int getErrorNumber(void) = 0;
};

#endif
